import request from '@/utils/request'
//获取角色列表
export const reqRoleList = (page,limit,roleName)=>{
 return request({
   url:`/admin/acl/role/${page}/${limit}`,
   method:'get',
   params:{roleName},
 })
}
//修改角色
export const reqUpdate = (data)=>{
  return request({
    url:`/admin/acl/role/update`,
    method:'put',
    data,
  })
}
//修改角色
export const addRole = (data)=>{
  return request({
    url:`/admin/acl/role/save`,
    method:'post',
    data,
  })
}
//删除角色
export const reqDeleteRole = (id)=>{
 return request({
   url:`/admin/acl/role/remove/${id}`,
   method:'delete',
 })
}
//批量删除角色
export const reqDeleteRoles = (idList)=>{
 return request({
   url:`/admin/acl/role/batchRemove`,
   method:'delete',
   data:idList
 })
}
//根据用户获取其权限列表
export const reqUserAcl = (roleId)=>{
 return request({
   url:`/admin/acl/permission/toAssign/${roleId}`,
   method:'get'
 })
}
//
export const reqDoAssignAcl = (data)=>{
 return request({
   url:`/admin/acl/permission/doAssignAcl`,
   method:'post',
   data,
 })
}
